import React, { Component } from "react";
import { Switch, Route, Rediret } from "react-router-dom";
import ProductAddUpdate from "./addUpdate";
import ProductDetail from "./productDetail";
import ProductHome from "./productHome";

class Product extends Component {
  constructor(props) {
    super(props);
    this.state = {};
  }
  render() {
    return (
      <Switch>
        <Route path="/product" component={ProductHome} exact />
        <Route path="/product/addupdate" component={ProductAddUpdate}></Route>
        <Route path="/product/detail" component={ProductDetail}></Route>
        <Rediret to="/product" />
      </Switch>
    );
  }
}

export default Product;
